package com.cal.utms.action.maintenance;

import com.cal.utms.dto.maintenance.CustomerContactPersonsDto;
import com.cal.utms.model.maintenance.CustomerModel;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class CustomerContactPersonAction extends ActionSupport implements ModelDriven<CustomerContactPersonsDto> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private CustomerContactPersonsDto contactPersonsDto = new CustomerContactPersonsDto();
	private boolean success;
	private int customer_id;

	public String getContactPersons() {
		CustomerModel customerModel = new CustomerModel();
		success = true;
		contactPersonsDto.setContactPersonsDtos(customerModel.getContactPerson(customer_id));
		return Action.SUCCESS;
	}

	@Override
	public CustomerContactPersonsDto getModel() {
		return contactPersonsDto;
	}

	public CustomerContactPersonsDto getContactPersonsDto() {
		return contactPersonsDto;
	}

	public void setContactPersonsDto(CustomerContactPersonsDto contactPersonsDto) {
		this.contactPersonsDto = contactPersonsDto;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public int getCustomer_id() {
		return customer_id;
	}

	public void setCustomer_id(int customer_id) {
		this.customer_id = customer_id;
	}

}
